home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / progutil / stdwin.zoo / ABOUT next >
INI File  |  1989-10-17  |  16KB  |  405 lines

  1. [Last modified on Sat Apr 15 20:19:00 MET DST 1989 by guido]
  2.  
  3.  
  4. 0. Copyright Notice
  5.  
  6. STDWIN is copyrighted: Copyright (c) 1988, 1989 by Stichting Mathematisch
  7. Centrum, Amsterdam, The Netherlands.  STDWIN is available for
  8. noncommercial use only, free of charge, and with no guarantees.  It can
  9. be freely used and distributed provided these restrictions are honoured.
  10.  
  11.  
  12. 1. Target systems
  13.  
  14. STDWIN is aimed at C programs.  It consists of a few header files (of
  15. which only one is visible to the user) and a library.  In most cases
  16. some system-provided libraries must also be used in the linking phase.
  17.  
  18. Currently, full STDWIN is available for the following environments:
  19.  
  20. (Note that in all cases the code is in beta test state; there may be
  21. bugs, functionality may change slightly in the future and new
  22. functionality may be added, but the basic framework isn't going to
  23. change much.)
  24.  
  25. *       X version 11, release 3 (should still work with release 2)
  26. *       Apple Macintosh, using either THINK C (3.01) or MPW C (2.02)
  27. *       Atari ST, using Mark Williams C (2.1)
  28.  
  29. You may volunteer to create a version for your favourite system, or to
  30. port it to your favourite C compiler for one of the mentioned micros.
  31. (The micro versions are rather compiler-dependent, due to the many
  32. differences between compilers and especially libraries.  Expect
  33. difficulties if you have another compiler or version than the ones
  34. mentioned.  Especially the Atari version is flakey.)
  35.  
  36. A subset, emulating most of STDWIN's functionality on an alphanumeric
  37. display (excluding line drawing, but including multiple (non-overlapping)
  38. windows, menus, text editing etc.) is available for:
  39.  
  40. *       Any decent Unix that has termcap (tested with 4.{2,3} BSD)
  41. *       MS-DOS, using the Microsoft C compiler (4.0)
  42.  
  43. Sorry, there are no versions yet for SunTools, SunView, NeWS, X10,
  44. MS-Windows, Presentation Manager or the Amiga.  A hacker might be able
  45. to turn the Atari ST version into a general GEM version.  The code is
  46. remarkably portable to different processor types and various Unix
  47. flavors, as long as they are derived from 4.xBSD.
  48.  
  49.  
  50. 2. Getting the full scoop
  51.  
  52. I have written a paper about STDWIN which has been published as a
  53. CWI report (Guido van Rossum: STDWIN -- A Standard Window System
  54. Interface.  Centre for Mathematics and Computer Science, report
  55. CS-R8817.  Amsterdam, 1988).
  56.  
  57. You can also get a source version for any or all of the above-mentioned
  58. systems.  This is essentially a directory dump of my working version,
  59. until I have the time or get some help to prepare a real distribution.
  60. It is available through anonymous ftp access from uunet.uu.net.
  61. The directory is amiga-sources/stdwin (thanks to the moderator, Peter
  62. da Silva) get the file README.txt for further instructions.  A version
  63. of this file is in ABOUT.txt.  (The version on gatekeeper no longer
  64. exists, although it may be revived in the near future).
  65.  
  66. Distribution to to non-ftp-users is solely by electronic mail.  Be
  67. prepared to receive up to half a megabyte (in 32K pieces in "shar"
  68. format).  If you're interested, write to guido@cwi.nl.
  69.  
  70.  
  71. 3. Basic functionality
  72.  
  73. STDWIN allows multiple "full-function" windows, roughly in Macintosh
  74. style (title bar, grow box, close box, scroll bars).  The appearance of
  75. windows is determined by the default of the underlying window manager,
  76. and so are other limitations (e.g., overlapping, maximum size, etc.).
  77. Windows are dynamically created and destroyed by the application, never
  78. directly by the user or the window manager.
  79.  
  80. STDWIN uses a coordinate system derived from the display's coordinate
  81. system: (0, 0) is top left, with X pointing right and Y pointing down
  82. (these are actually called h and v).  Pixel size is that of the display.
  83. There are enquiry functions to ask for the display size in pixels and in
  84. millimeters.
  85.  
  86. The application is responsible for redrawing the window contents when it
  87. is exposed.  This is done by associating a "draw procedure" with each
  88. window, which knows how to draw the entire window's contents.  It gets
  89. passed a pointer to the window and the coordinates of the rectangle that
  90. needs to be redrawn, so it can (although it needn't) restrict itself to
  91. that area.  STDWIN guarantees that a window's redraw procedure is only
  92. called while the application is waiting for an input event (most
  93. implementations simply turn exposure events into calls to the draw
  94. procedure).
  95.  
  96. If the application wants to change part of the graphics it is
  97. displaying, this is usually done in a two-phase process: first, STDWIN
  98. is told that a particular area of the screen must be changed; later,
  99. when the application starts waiting for input events again, the draw
  100. procedure is called to update the indicated area (and any other area
  101. that was exposed or damaged in some way).
  102.  
  103. The application defines the width and height of the area it wants to
  104. draw; this needn't bear any relation to the window or screen size.  This
  105. area is called the "document" although you may also think of it as a
  106. virtual window.  The actual window generally displays a sub-area of the
  107. document; the window's scroll bars indicate the position of the window
  108. with respect to the document.  The application always uses the
  109. coordinates of its document; STDWIN performs the translation to window
  110. or screen coordinates are required by the window manager, and ensures
  111. clipping of all output to the window.
  112.  
  113. STDWIN is event-based.  An application is expected to have a main loop
  114. containing a "get event" call followed by a switch on the event type.
  115. There is no event mask; an application can simply ignore events it isn't
  116. interested in.  The most important event types are:
  117.  
  118. ACTIVATE:       A window becomes active (keyboard attached and/or topmost)
  119.  
  120. CHAR:           ASCII character key pressed (except BS, TAB, CR)
  121.  
  122. COMMAND:        special key or function (CLOSE, TAB, RETURN, BS, CANCEL,
  123.                 arrow keys etc.)
  124.  
  125. MOUSE:          MOUSE DOWN, MOUSE MOVE (only while down), MOUSE UP;
  126.                 fields in the event record indicate the h, v position,
  127.                 the number of the button, and the "click number" if the
  128.                 event is potentially part of a multiple-click sequence
  129.  
  130. MENU:           menu id and item number of a menu selection
  131.  
  132. SIZE:           user has resized the window
  133.  
  134. TIMER:          the window's timer went off; each window has one
  135.                 programmable timer which can be set to go off at N/10
  136.                 seconds in the future.  When the timer goes off a TIMER
  137.                 event is returned.
  138.  
  139. Normally, STDWIN draws text in a single font.  The actual font used
  140. depends on the underlying window manager (and can sometimes be
  141. influenced by the application programmer and/or the end user in a
  142. system-dependent manner).  The font may be proportionally spaced, and
  143. there are enquiry functions to find out the dimensions of characters and
  144. strings.  There are also functions to change the font name and point
  145. size dynamically; but these work different in different systems,
  146. especially the allowed font names differ drastically.  This feature is
  147. used with some success in the ditroff previewer that is supplied as a
  148. demo.
  149.  
  150. There are functions to draw text and simple lines, rectangles and
  151. circles, and ways to erase, shade or invert rectangular areas.  There is
  152. no way (yet) to do general bitblt operations, or to influence the pen
  153. shape.
  154.  
  155.  
  156. 4. Higher level functionality
  157.  
  158. STDWIN provides a blinking vertical bar which can be used to indicate
  159. the text insertion point, so the application needn't use TIMER events to
  160. do the blinking.
  161.  
  162. STDWIN provides Macintosh-style menus.  Each window has its own set of
  163. menus, although by default all menus apply to all windows.  A reasonably
  164. number of menus per window is allowed, each with a reasonable number of
  165. (textual) menu items.  Menus can be changed dynamically.  Items can be
  166. enabled or disabled, and a 'tick mark' can be placed in front of an
  167. item.  Each menu item may have a shortcut character, which, when typed
  168. in combination with some system-defined meta key (e.g., ALT or an ESC-
  169. prefix) selects the menu item (if enabled).  Menu selection is done
  170. completely "underwater"; all the application notices are MENU events.
  171.  
  172. STDWIN has a